package com.qk.management.mapper;

import com.qk.dto.role.RoleDTO;
import com.qk.entity.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: 20918
 * @date: 2025/10/9 11:32
 * @description:
 */
@Mapper
public interface RoleMapper {
    @Select("select * from role")
    List<Role> list();


    List<Role> getList(RoleDTO roleDTO);

    void add(Role role);
    @Delete("delete from role where id = #{id}")
    void deleteById(Integer id);

    Role selectById(Integer id);

    int count();

    void update(Role role);

    @Select("select * from role where label = #{roleLabel}")
    Role selectByLabel(String roleLabel);
}
